﻿
@{
    ViewBag.Title = "患者转区";
    Layout = "~/Views/Shared/_Form.cshtml";
}

<form id="form1">
    <div class="panel panel-default" style="padding-right:10px;">
        <table class="form">
            <tr>
                <th class="formTitle">病区：</th>
                <td class="formValue formDdlSelectorTd">
                    <select id="sel_inpatientArea" class="form-control">
                        <option value="">==请选择==</option>
                    </select>
                </td>
            </tr>
        </table>
    </div>
</form>
<script lang="javascript">
    $(function () {
        initinpatientList();
    });
    function initinpatientList() {
        $("#sel_inpatientArea").bindSelect({
            //url: "/SystemManage/BaseData/GetAuthedWardSelectJson",
            url: "/NurseManage/EntryRegistration/TreeViewdata",
        });

        $("#sel_inpatientArea").removeAttr("style");
    }
    function SaveChangeArea()
    {
        var bqdm = $('#sel_inpatientArea').val();
        if (bqdm == "" || bqdm==null) {
            $.modalAlert('请选择病区！', 'warning');
            return;
        }
        $.ajax({
            type: "POST",
            url: "/EntryRegistration/SaveChangeArea",
            data: { zyh: '@ViewBag.zyh', bqdm: $('#sel_inpatientArea').val() },
            dataType: "json",
            async: false,
            success: function (ajaxresp) {
                if (ajaxresp.state == "success") {
                    $.modalMsg('转区成功', 'success');
                }
                else {
                    $.modalAlert(ajaxresp.message, 'warning');
                }
                clearData();
            }
        });
    }
    </script>
